# -*- coding:utf-8 -*-
# File Name:resource_info_util.py
# Author:jing
# Date:2018/12/18
from interface.resource import Resource
from model.mongo_model.resource_info import ResourceInfo
from orm import get_resource_mapper

__author__ = 'jing'


def get_resource(resource_info: ResourceInfo) -> Resource:
    return get_resource_mapper().get(resource_info.resource_type)(resource_info)
